home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / OSEvents.h < prev    next >
Text File  |  1991-04-17  |  2KB  |  70 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:34 PM
  4.     OSEvents.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __OSEVENTS__
  15. #define __OSEVENTS__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __EVENTS__
  22. #include <Events.h>
  23. #endif
  24.  
  25. #ifndef __OSUTILS__
  26. #include <OSUtils.h>
  27. #endif
  28.  
  29.  
  30. struct EvQEl {
  31.     QElemPtr qLink;
  32.     short qType;
  33.     short evtQWhat;     /*this part is identical to the EventRecord as...*/
  34.     long evtQMessage;   /*defined in ToolIntf*/
  35.     long evtQWhen;
  36.     Point evtQWhere;
  37.     short evtQModifiers;
  38. };
  39.  
  40. typedef struct EvQEl EvQEl;
  41. typedef EvQEl *EvQElPtr;
  42.  
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. #pragma parameter __D0 PostEvent(__A0,__D0)
  48. pascal OSErr PostEvent(short eventNum,long eventMsg)
  49.     = 0xA02F; 
  50. #pragma parameter __D0 PPostEvent(__A0,__D0,__A1)
  51. pascal OSErr PPostEvent(short eventCode,long eventMsg,EvQElPtr *qEl)
  52.     = {0xA12F,0x2288}; 
  53. #pragma parameter __D0 OSEventAvail(__D0,__A0)
  54. pascal Boolean OSEventAvail(short mask,EventRecord *theEvent)
  55.     = {0xA030,0x5240}; 
  56. #pragma parameter __D0 GetOSEvent(__D0,__A0)
  57. pascal Boolean GetOSEvent(short mask,EventRecord *theEvent)
  58.     = {0xA031,0x5240}; 
  59. pascal void FlushEvents(short whichMask,short stopMask)
  60.     = {0x201F,0xA032}; 
  61. #pragma parameter SetEventMask(__D0)
  62. pascal void SetEventMask(short theMask)
  63.     = {0x31C0,0x0144}; 
  64. #define GetEvQHdr() ((QHdrPtr) 0x014A)
  65. #ifdef __cplusplus
  66. }
  67. #endif
  68.  
  69. #endif
  70.